<template>
  <van-sticky>
    <div class="content">
      <div class="title" @click="gotoSearch">
        <i class="iconfont icon-search"></i>
        <span>搜索商品,共118484款好物</span>
      </div>
    </div>
  </van-sticky>
</template>

<script lang="ts">
import { defineComponent } from "vue"

export default defineComponent({
  name: "gotoSearch",
})
</script>

<script lang="ts" setup>
import { useRouter } from "vue-router"

const router = useRouter()
const gotoSearch = () => {
  router.push({ path: "/search" })
}
</script>

<style lang="less" scoped>
.content {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0 15px;
  height: 44px;
  background-color: #fff;
  .title {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #ededed;
    font-size: 14px;
    font-weight: 500;
    color: #666666;
    height: 28px;
    text-align: center;
    flex: 1;

    .icon-search {
      margin-right: 5px;
      font-size: 14px;
    }
  }
}
</style>
